server = user1@example.com
path = /usr/local/apache2/htdocs/example.com/dev/
dev:
	@echo asdf
	@rm -rf ../tmp/
	@cp -R ./ ../tmp/
	@rm -rf ../tmp/book/
	@rm -rf ../tmp/webroot/books/*
	@cd ../tmp/; tar -zcvf ../tmp.bz2 ./
	@scp ../tmp.bz2 $(server):$(path)
	@rm ../tmp.bz2
	@ssh $(server) 'cd $(path); tar -zxvf tmp.bz2; chmod 777 webroot/books/'
	@echo dev ok
prod:
	@echo prod ok
